home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-03 | 3.6 KB | 158 lines | [TEXT/MPS ] |
- // UMailerView.h
- // Copyright © 1984-96 by Apple Computer, Inc. All rights reserved.
-
-
- #ifndef __UMAILERVIEW__
- #define __UMAILERVIEW__
-
- #if qPowerTalk
-
- // MacApp
-
- #ifndef __UTABBEHAVIORS__
- #include "UTabBehaviors.h"
- #endif
-
- #ifndef __UVIEW__
- #include "UView.h"
- #endif
-
- // Toolbox
-
- #ifndef __OCESTANDARDMAIL__
- #include <OCEStandardMail.h>
- #endif
-
- class TLetter;
-
- //----------------------------------------------------------------------------------------
- // Constants
- //----------------------------------------------------------------------------------------
-
- const IDType kMailerViewID = 'MAIL';
-
- const Boolean kExpanded = TRUE;
- const Boolean kContracted = FALSE;
-
- const Boolean kCanContract = TRUE;
- const Boolean kCannotContract = FALSE;
-
- //----------------------------------------------------------------------------------------
- // TMailerView
- //----------------------------------------------------------------------------------------
-
- // View that holds the SMP Mailer. Handles events for the mailer that were not handled in
- // TApplication::DoMailerEvent.
-
- class TMailerView : public TView
- {
-
- MA_DECLARE_CLASS;
-
- public:
- TLetter* fLetter;
- SMPMailerComponent fLastTargetField;
- Boolean fMailerExpanded;
- Boolean fMailerClosed;
-
- TMailerView();
- virtual ~TMailerView();
- // Destructor
-
- void Activate(Boolean entering);
-
- void IMailerView(TLetter* itsLetter,
- TView* itsSuperView,
- Boolean initiallyExpanded);
-
- virtual void OpenNewMailer(Boolean initiallyExpanded,
- Boolean canContract);
-
- virtual void OpenOldMailer(LetterDescriptor theDesc,
- Boolean initiallyExpanded,
- Boolean canContract);
-
- virtual void OpenReplyMailer(WindowRef theReplyToWindow,
- Boolean replyToAll,
- Boolean initiallyExpanded,
- Boolean canContract);
-
- virtual void Draw(const VRect& area); // Override
-
- virtual void Close(); // Override
-
- virtual void BecameTarget(); // Override
-
- virtual void ResignedTarget(); // Override
-
- virtual void ExpandMailer();
-
- virtual void ContractMailer();
-
- static CPoint GetDimensions(Boolean expanded);
-
- virtual void DoSetupMenus(); // Override
-
- virtual void DoMenuCommand(CommandNumber aCommandNumber); // Override
-
- virtual void DoMouseCommand(VPoint& theMouse,
- TToolboxEvent* event,
- CPoint hysteresis); // Override
-
- virtual void DoMouseUp(VPoint& theMouse,
- TToolboxEvent* event,
- CPoint hysteresis); // Override
-
- virtual void DoKeyEvent(TToolboxEvent* event); // Override
-
- virtual void DoKeyUp(TToolboxEvent* event); // Override
-
-
- virtual void DoMailerEvent(TToolboxEvent* event);
-
- virtual void InvalidateFrameDifference( const VRect& oldFrame,
- const VRect& newFrame); // Override
-
- virtual Boolean WantsToBeTarget(); // Override
-
- virtual Boolean WantsToBeTabTarget();
- };
-
- //----------------------------------------------------------------------------------------
- // TLetterTabber
- //----------------------------------------------------------------------------------------
-
- class TLetterTabber : public TViewTabber
- {
- MA_DECLARE_CLASS;
-
- protected:
- TLetter* fLetter;
-
- public:
- TLetterTabber();
- // Default constructor
-
- virtual ~TLetterTabber();
- // Destructor
-
- void ILetterTabber(Boolean recursive, TLetter *itsLetter);
-
- virtual void FindSubViewTargets(TView* parent, Boolean tabBackward); //override
- };
-
- //----------------------------------------------------------------------------------------
-
- // Globals for this unit
-
- extern void InitUMailerView();
- // Sets up proc pointers and does general initialization
-
- extern PrepareMailerForDrawingUPP gMacAppPrepareMailerForDrawingProc;
-
- extern FrontWindowUPP gFrontWindowUPP;
-
- #endif // qPowerTalk
-
- #endif // __UMAILERVIEW__
-